home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_09_03
/
9n03038b
< prev
next >
Wrap
Text File
|
1991-01-20
|
937b
|
40 lines
/*********************************************************
* NAME : key_msg
* DESCRIPTION: get a key, decode, put in key queue
**********************************************************/
#include "que.h"
extern struct g_queue key_que;
void key_msg()
{
unsigned char position, key;
position = (unsigned char)0x00;
while ( 1 )
{
while (getkey(&position) < 0)
suspend();
insert_one(position,&key_que);
}
}
/*********************************************************
* NAME: getkey
* DESCRIPTION: get key position from interrupt routine
*********************************************************/
getkey(position)
unsigned char *position;
{
int x;
/* has there been a read of keypad
* is there a disable msg
* if there has been a read - then
* decode and verify the key then return
* it in x
*/
return x;
}